import type { RouteRecordRaw } from 'vue-router'
import { mainPage, rootPage } from './constants'
import { pageEnum } from '@/enums/pageEnum'

export const rootPageRoute: RouteRecordRaw = {
  path: '/',
  name: 'root',
  redirect: pageEnum.BASE_MAIN,
  component: rootPage,
  children: [
    {
      path: pageEnum.BASE_MAIN.replace('/', ''),
      name: pageEnum.BASE_MAIN_NAME,
      component: mainPage,
      meta: {
        isKeepAlive: true,
        title: '首页'
      }
    }
  ]
}
